Page({

    /**
     * 页面的初始数据
     */
    data: {
        stepList: [],
        teamList: [],
        modalName: "",
        title: "商品议价",
        goodsId: "",
        userFactoryId: "",
        excludeIds: "",
        includesPickType: "",
        goods: {
            goodsSaleType: "",
            userPartnerId: "",
            beginNum: 0,
            goodsPrice: 0,
            sourceType: "",
            goodsMode: "",
            userSupplierId: "",
            authOrgId: "",
            oilHouseId: "",
            goodsStatus: "",
            houseStorageNum: 0,
            goodsOrgId: "",
            goodsImg: "",
            includeIds: "",
            sellType: "",
            originalPrice: "",
            originalTime: ""
        },
        form: {
            oilHouseId: "",
            yjPrice: 0,
            goodsProductId: "",
            goodsId: "",
            goodsName: "",
            userSupplierId: "",
            userFactoryId: "",
            num: 0,
            customerManagerPhone: "",
            customerManager: "",
            priceProtectionFlag: "0",
            oilHouseAddress: "",
            pickType: "",
            userBuyerRemark: "",
            type: "",
            userPartnerId: "",
            userMandatorId: "",
            userBuyerId: "",
            orderType: "",
            realOrderType: "",
            tradeMode: "",
            lockDay: 30,
            goodsSourceType: "",
            positionBelongOrgId: "",
            sourceId: "",
            cj: 0,
            price: 0,
            discountPrice: 0,
            discountAmount: 0,
            serviceAmount: 0,
            orderAmount: 0,
            goodsAmount: 0,
            autoAcceptFlag: "1",
            userFactoryName: "",
            userSupplierName: "中国石油福建有限公司",
            userSupplierNameReal: "",
            distributionAmount: 0,
            payMethod: "",
            dataSource: "detail"
        },
        maxNum: 1e6,
        maxPrice: 1e6,
        priceProtectionFlagShow: !0,
        value: "",
        dialogVisible: !1,
        orgType: "",
        buyFlag: !1,
        talkFlag: 1,
        talkFlagMark: !1,
        priceFlag: 1,
        isBuy: !1,
        liClassFlag: "0",
        userMandatorId: "",
        userInfo: 'o.getStorageSync("userInfo")',
        oilHouseFlag: !1,
        imgStyle: "",
        scroll: !1,
        cjFlag: 1,
        showOriginalPrice: !1,
        buyerName:'请选择买家'
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {
    },


    onReady() {

    },
    
    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {

    },

    /**
     * 生命周期函数--监听页面隐藏
     */
    onHide() {

    },
    chooseSeller(e){
        let pages = getCurrentPages();
        let prevPage = pages[pages.length-2];
        prevPage.setData({
            buyerName: e.currentTarget.dataset.item.orgName,
        });
        wx.navigateBack({
          delta: 1,
        })
    },
    submit: function() {
        this.data.title = "立即下单",
        this.data.modalName = "bottomModal",
        this.data.scroll == 0;
        this.setData({
            title:this.data.title,
            modalName:this.data.modalName,
            scroll:this.data.scroll
        })
        wx.navigateTo({
            url: '/pages/member/billing/billing',
          })
    },
    cancel: function() {
        this.data.modalName = "",
        this.data.talkFlagMark = !1,
        this.data.talkFlag = !0, 
        // this.data.scroll == 1;
        this.setData({
            modalName:this.data.modalName,
            talkFlagMark:this.data.talkFlagMark,
            talkFlag:this.data.talkFlag,
            scroll:this.data.scroll
        })
    },
    yjFunction: function(o) {
        this.data.title = "商品议价",
        this.data.modalName = "bottomModal",
        this.data.talkFlagMark = !0,
        this.data.priceFlag = !0,
        // this.scroll ==0;
        this.setData({
            title:this.data.title,
            modalName:this.data.modalName,
            talkFlagMark:this.data.talkFlagMark,
            priceFlag:this.data.priceFlag,
            scroll:this.data.scroll
        })
    },
    /**
     * 生命周期函数--监听页面卸载
     */
    onUnload() {

    },

    /**
     * 页面相关事件处理函数--监听用户下拉动作
     */
    onPullDownRefresh() {

    },

    /**
     * 页面上拉触底事件的处理函数
     */
    onReachBottom() {

    },

    /**
     * 用户点击右上角分享
     */
    onShareAppMessage() {

    }
})